package com.campus.service;

import com.campus.entity.Class;
import com.campus.mapper.ClassMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;

@Service
public class ClassServiceImpl implements ClassService {
    @Autowired
    private ClassMapper classMapper;
    @Override
    public void insertClass(Class clazz){
        clazz.setCreatedTime(LocalDateTime.now());
        classMapper.insert(clazz);
    }
    @Override
    public void updateClass(Class clazz){
        classMapper.update(clazz);
    }
}
